import { pubRequire } from '@utils/public'
const baseUrl = '/activities/posts'
//作品维护列表
export function getPreserveList(obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}`, obj, callbBack, errBack)
}
//批量删除
export function delItem(obj, callbBack, errBack) {
  return pubRequire('delete', `${baseUrl}`, obj, callbBack, errBack)
}
//我的发布列表
export function getMineList(obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}/me`, obj, callbBack, errBack)
}
//获取最新编辑者
export function editor(id, callbBack, errBack) {
  return pubRequire(
    'get',
    `${baseUrl}/${id}/latest-editors`,
    '',
    callbBack,
    errBack
  )
}
//修改虚拟分享量
export function changeShare(id, obj, callbBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/${id}/share-counts`,
    obj,
    callbBack,
    errBack
  )
}
//单个删除
export function delSingle(id, obj, callbBack, errBack) {
  return pubRequire('delete', `${baseUrl}/${id}`, obj, callbBack, errBack)
}
//发布帖子
export function pubPost(obj, callbBack, errBack) {
  return pubRequire('post', `${baseUrl}/me`, obj, callbBack, errBack)
}
